<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport"
          content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>预约挂号</title>
    <script src="js/tagetUrl.js"></script>
    <script src="js/jquery.min.js"></script>
    <link rel="stylesheet" type="text/css" href="css/aui.css"/>
    <link rel="stylesheet" type="text/css" href="css/main.css"/>
    <script>
        $(function () {
            alert(location.href)
        })
    </script>
</head>
<body>
<div class="site-name">
    <p>北京114预约挂号平台</p>
</div>

<div class="yuyue-container">
    <div class="yuyue-wrapper">
        <div class="yuyue-title">
            <span>北京协和医院</span>
            <span>内科</span>
        </div>
        <div class="yuyue-name">
            <h4>特需内科门诊</h4>
        </div>
        <div class="common-nav">
            <div class="common-tab">
                <a href="javascript:;" class="common-tab-active" data-type="1">按日期挂号</a>
            </div>
            <div class="common-tab">
                <a href="javascript:;" data-type="2">按专家挂号</a>
            </div>
        </div>
        <div class="yuyue-date">
            <div class="yuyue-time-list">
                <div class="yuyue-time-item yuyue-time-item-active" data-status="1">
                    <span>周四</span>
                    <p>11月26号</p>
                    <i>无号</i>
                </div>
                <div class="yuyue-time-item" data-status="2">
                    <h5>周四</h5>
                    <strong>11月26号</strong>
                    <em>有号</em>
                </div>
                <div class="yuyue-time-item" data-status="3">
                    <span>周四</span>
                    <p>11月26号</p>
                    <i>约满</i>
                </div>
                <div class="yuyue-time-item" data-status="1">
                    <span>周四</span>
                    <p>11月26号</p>
                    <i>无号</i>
                </div>
                <div class="yuyue-time-item" data-status="1">
                    <span>周四</span>
                    <p>11月26号</p>
                    <i>无号</i>
                </div>
                <div class="yuyue-time-item" data-status="1">
                    <span>周四</span>
                    <p>11月26号</p>
                    <i>无号</i>
                </div>
                <div class="yuyue-time-item" data-status="1">
                    <span>周四</span>
                    <p>11月26号</p>
                    <i>无号</i>
                </div>
                <div class="yuyue-time-item" data-status="1">
                    <span>周四</span>
                    <p>11月26号</p>
                    <i>无号</i>
                </div>
            </div>

            <div class="yuyue-time-choose">
                <span>查看</span>
                <span>日期</span>
            </div>
        </div>

        <div class="yuyue-full" style="display:none;">
            <div class="yuyue-doctor-title">
                <h4>上午号源</h4>
            </div>
            <div class="yuyue-doctor-list">
                <div class="yuyue-doctor-item">
                    <div class="yuyue-doctor-info">
                        <div class="yuyue-doctor-user">
                            <h4>医师</h4>
                            <em>|</em>
                            <span>杨春华</span>
                        </div>
                        <div class="yuyue-doctor-desc">
                            <p>擅长类风湿关节炎、擅长类风湿关节炎擅长类风湿关节炎擅长类风湿关节炎、擅长类风湿关节炎</p>
                        </div>
                    </div>

                    <div class="yuyue-doctor-price">
                        <h4>￥50</h4>
                    </div>
                    <a class="yuyue-doctor-btn">
                        <h4>约满</h4>
                    </a>
                </div>

                <div class="yuyue-doctor-item">
                    <div class="yuyue-doctor-info">
                        <div class="yuyue-doctor-user">
                            <h4>医师</h4>
                            <em>|</em>
                            <span>杨春华</span>
                        </div>
                        <div class="yuyue-doctor-desc">
                            <p>擅长类风湿关节炎、擅长类风湿关节炎擅长类风湿关节炎擅长类风湿关节炎、擅长类风湿关节炎</p>
                        </div>
                    </div>

                    <div class="yuyue-doctor-price">
                        <h4>￥50</h4>
                    </div>
                    <a class="yuyue-doctor-btn">
                        <h4>约满</h4>
                    </a>
                </div>
            </div>
        </div>

        <div class="yuyue-have" style="display:none;">
            <div class="yuyue-doctor-title">
                <h4>上午号源</h4>
            </div>
            <div class="yuyue-doctor-list">
                <div class="yuyue-doctor-item">
                    <div class="yuyue-doctor-info">
                        <div class="yuyue-doctor-user">
                            <h4>医师</h4>
                            <em>|</em>
                            <span>杨春华</span>
                        </div>
                        <div class="yuyue-doctor-desc">
                            <p>擅长类风湿关节炎、擅长类风湿关节炎擅长类风湿关节炎擅长类风湿关节炎、擅长类风湿关节炎</p>
                        </div>
                    </div>

                    <div class="yuyue-doctor-price yuyue-doctor-price-active">
                        <h4>￥50</h4>
                    </div>
                    <a class="yuyue-doctor-btn yuyue-doctor-btn-active" href="submit.html">
                        <h4>剩余</h4>
                        <span>12</span>
                    </a>
                </div>

                <div class="yuyue-doctor-item">
                    <div class="yuyue-doctor-info">
                        <div class="yuyue-doctor-user">
                            <h4>医师</h4>
                            <em>|</em>
                            <span>杨春华</span>
                        </div>
                        <div class="yuyue-doctor-desc">
                            <p>擅长类风湿关节炎、擅长类风湿关节炎擅长类风湿关节炎擅长类风湿关节炎、擅长类风湿关节炎</p>
                        </div>
                    </div>

                    <div class="yuyue-doctor-price">
                        <h4>￥50</h4>
                    </div>
                    <a class="yuyue-doctor-btn">
                        <h4>约满</h4>
                    </a>
                </div>
            </div>
        </div>

        <div class="yuyue-empty" style="display:block;">
            <p>当天已无号，请查看其他日期号源</p>
        </div>


        <div class="doctor-list" style="display:none;">
            <a class="doctor-item" href="zhuanjia.html">
                <div class="doctor-avator">
                    <img src="images/doctor.png"/>
                </div>
                <div class="doctor-body">
                    <div class="doctor-user">
                        <h4>医师</h4>
                        <em>|</em>
                        <span>钟南山</span>
                    </div>
                    <div class="doctor-desc">
                        <p>擅长类风湿关节炎、擅长类风湿关节炎擅长类风湿关节炎擅长类风湿关节炎、擅长类风湿关节炎</p>
                    </div>
                </div>
                <div class="doctor-arrow">
                    <i class="aui-iconfont aui-icon-right"></i>
                </div>
            </a>
            <a class="doctor-item" href="zhuanjia.html">
                <div class="doctor-avator">
                    <img src="images/doctor.png"/>
                </div>
                <div class="doctor-body">
                    <div class="doctor-user">
                        <h4>医师</h4>
                        <em>|</em>
                        <span>钟南山</span>
                    </div>
                    <div class="doctor-desc">
                        <p>擅长类风湿关节炎、擅长类风湿关节炎擅长类风湿关节炎擅长类风湿关节炎、擅长类风湿关节炎</p>
                    </div>
                </div>
                <div class="doctor-arrow">
                    <i class="aui-iconfont aui-icon-right"></i>
                </div>
            </a>
            <a class="doctor-item" href="zhuanjia.html">
                <div class="doctor-avator">
                    <img src="images/doctor.png"/>
                </div>
                <div class="doctor-body">
                    <div class="doctor-user">
                        <h4>医师</h4>
                        <em>|</em>
                        <span>钟南山</span>
                    </div>
                    <div class="doctor-desc">
                        <p>擅长类风湿关节炎、擅长类风湿关节炎擅长类风湿关节炎擅长类风湿关节炎、擅长类风湿关节炎</p>
                    </div>
                </div>
                <div class="doctor-arrow">
                    <i class="aui-iconfont aui-icon-right"></i>
                </div>
            </a>
            <a class="doctor-item" href="zhuanjia.html">
                <div class="doctor-avator">
                    <img src="images/doctor.png"/>
                </div>
                <div class="doctor-body">
                    <div class="doctor-user">
                        <h4>医师</h4>
                        <em>|</em>
                        <span>钟南山</span>
                    </div>
                    <div class="doctor-desc">
                        <p>擅长类风湿关节炎、擅长类风湿关节炎擅长类风湿关节炎擅长类风湿关节炎、擅长类风湿关节炎</p>
                    </div>
                </div>
                <div class="doctor-arrow">
                    <i class="aui-iconfont aui-icon-right"></i>
                </div>
            </a>
            <a class="doctor-item" href="zhuanjia.html">
                <div class="doctor-avator">
                    <img src="images/doctor.png"/>
                </div>
                <div class="doctor-body">
                    <div class="doctor-user">
                        <h4>医师</h4>
                        <em>|</em>
                        <span>钟南山</span>
                    </div>
                    <div class="doctor-desc">
                        <p>擅长类风湿关节炎、擅长类风湿关节炎擅长类风湿关节炎擅长类风湿关节炎、擅长类风湿关节炎</p>
                    </div>
                </div>
                <div class="doctor-arrow">
                    <i class="aui-iconfont aui-icon-right"></i>
                </div>
            </a>
            <a class="doctor-item" href="zhuanjia.html">
                <div class="doctor-avator">
                    <img src="images/doctor.png"/>
                </div>
                <div class="doctor-body">
                    <div class="doctor-user">
                        <h4>医师</h4>
                        <em>|</em>
                        <span>钟南山</span>
                    </div>
                    <div class="doctor-desc">
                        <p>擅长类风湿关节炎、擅长类风湿关节炎擅长类风湿关节炎擅长类风湿关节炎、擅长类风湿关节炎</p>
                    </div>
                </div>
                <div class="doctor-arrow">
                    <i class="aui-iconfont aui-icon-right"></i>
                </div>
            </a>
            <a class="doctor-item" href="zhuanjia.html">
                <div class="doctor-avator">
                    <img src="images/doctor.png"/>
                </div>
                <div class="doctor-body">
                    <div class="doctor-user">
                        <h4>医师</h4>
                        <em>|</em>
                        <span>钟南山</span>
                    </div>
                    <div class="doctor-desc">
                        <p>擅长类风湿关节炎、擅长类风湿关节炎擅长类风湿关节炎擅长类风湿关节炎、擅长类风湿关节炎</p>
                    </div>
                </div>
                <div class="doctor-arrow">
                    <i class="aui-iconfont aui-icon-right"></i>
                </div>
            </a>
        </div>

    </div>
</div>

<div class="div-line"></div>

<div class="filter-container">
    <div class="filter-wrapper">
        <div class="filter-tui">
            <h4>推荐科室</h4>
        </div>
        <div class="filter-right">
            <div class="filter-item filter-item-active">
                <span>综合排序</span>
                <i class="filter-rank"></i>
            </div>
            <div class="filter-item">
                <span>按距离</span>
                <i class="filter-location"></i>
            </div>
        </div>
    </div>

</div>

<div class="common-list" style="margin-top:0px;">
    <div class="common-item">
        <div class="common-item-top">
            <div class="common-logo">
                <img src="/images/hos_5.png"/>
            </div>
            <div class="common-body">
                <h4>北京协和医院</h4>
                <span>三级甲等</span>
            </div>
        </div>

        <div class="common-item-bottom">
            <a href="yuyue.html">核酸检测1</a>
            <a href="yuyue.html">核酸检测222</a>
            <a href="yuyue.html">核酸检测2</a>
            <a href="yuyue.html">核酸检测33333</a>
            <a href="yuyue.html">核酸检测4</a>
            <a href="yuyue.html">核酸检测33</a>
            <a href="yuyue.html">核酸检测22</a>
        </div>

    </div>

    <div class="common-item">
        <div class="common-item-top">
            <div class="common-logo">
                <img src="/images/hos_4.png"/>
            </div>
            <div class="common-body">
                <h4>北京协和医院</h4>
                <span>三级甲等</span>
            </div>
        </div>

        <div class="common-item-bottom">
            <a href="yuyue.html">核酸检测1</a>
            <a href="yuyue.html">核酸检测222</a>
            <a href="yuyue.html">核酸检测2</a>
            <a href="yuyue.html">核酸检测33333</a>
            <a href="yuyue.html">核酸检测4</a>
            <a href="yuyue.html">核酸检测33</a>
            <a href="yuyue.html">核酸检测22</a>
        </div>

    </div>

    <div class="common-item">
        <div class="common-item-top">
            <div class="common-logo">
                <img src="/images/hos_2.png"/>
            </div>
            <div class="common-body">
                <h4>北京协和医院</h4>
                <span>三级甲等</span>
            </div>
        </div>

        <div class="common-item-bottom">
            <a href="yuyue.html">核酸检测1</a>
            <a href="yuyue.html">核酸检测222</a>
            <a href="yuyue.html">核酸检测2</a>
            <a href="yuyue.html">核酸检测33333</a>
            <a href="yuyue.html">核酸检测4</a>
            <a href="yuyue.html">核酸检测33</a>
            <a href="yuyue.html">核酸检测22</a>
        </div>

    </div>

    <div class="common-item">
        <div class="common-item-top">
            <div class="common-logo">
                <img src="/images/hos_1.png"/>
            </div>
            <div class="common-body">
                <h4>北京协和医院</h4>
                <span>三级甲等</span>
            </div>
        </div>

        <div class="common-item-bottom">
            <a href="yuyue.html">核酸检测1</a>
            <a href="yuyue.html">核酸检测222</a>
            <a href="yuyue.html">核酸检测2</a>
            <a href="yuyue.html">核酸检测33333</a>
            <a href="yuyue.html">核酸检测4</a>
            <a href="yuyue.html">核酸检测33</a>
            <a href="yuyue.html">核酸检测22</a>
        </div>

    </div>

    <div class="common-item">
        <div class="common-item-top">
            <div class="common-logo">
                <img src="/images/hos_1.png"/>
            </div>
            <div class="common-body">
                <h4>北京协和医院</h4>
                <span>三级甲等</span>
            </div>
        </div>

        <div class="common-item-bottom">
            <a href="yuyue.html">核酸检测1</a>
            <a href="yuyue.html">核酸检测222</a>
            <a href="yuyue.html">核酸检测2</a>
            <a href="yuyue.html">核酸检测33333</a>
            <a href="yuyue.html">核酸检测4</a>
            <a href="yuyue.html">核酸检测33</a>
            <a href="yuyue.html">核酸检测22</a>
        </div>

    </div>

    <div class="common-item">
        <div class="common-item-top">
            <div class="common-logo">
                <img src="/images/hos_5.png"/>
            </div>
            <div class="common-body">
                <h4>北京协和医院</h4>
                <span>三级甲等</span>
            </div>
        </div>

        <div class="common-item-bottom">
            <a href="yuyue.html">核酸检测1</a>
            <a href="yuyue.html">核酸检测222</a>
            <a href="yuyue.html">核酸检测2</a>
            <a href="yuyue.html">核酸检测33333</a>
            <a href="yuyue.html">核酸检测4</a>
            <a href="yuyue.html">核酸检测33</a>
            <a href="yuyue.html">核酸检测22</a>
        </div>

    </div>

    <div class="common-item">
        <div class="common-item-top">
            <div class="common-logo">
                <img src="/images/hos_3.png"/>
            </div>
            <div class="common-body">
                <h4>北京协和医院</h4>
                <span>三级甲等</span>
            </div>
        </div>

        <div class="common-item-bottom">
            <a href="yuyue.html">核酸检测1</a>
            <a href="yuyue.html">核酸检测222</a>
            <a href="yuyue.html">核酸检测2</a>
            <a href="yuyue.html">核酸检测33333</a>
            <a href="yuyue.html">核酸检测4</a>
            <a href="yuyue.html">核酸检测33</a>
            <a href="yuyue.html">核酸检测22</a>
        </div>

    </div>

    <div class="common-item">
        <div class="common-item-top">
            <div class="common-logo">
                <img src="/images/hos_5.png"/>
            </div>
            <div class="common-body">
                <h4>北京协和医院</h4>
                <span>三级甲等</span>
            </div>
        </div>

        <div class="common-item-bottom">
            <a href="yuyue.html">核酸检测1</a>
            <a href="yuyue.html">核酸检测222</a>
            <a href="yuyue.html">核酸检测2</a>
            <a href="yuyue.html">核酸检测33333</a>
            <a href="yuyue.html">核酸检测4</a>
            <a href="yuyue.html">核酸检测33</a>
            <a href="yuyue.html">核酸检测22</a>
        </div>

    </div>

    <div class="common-item">
        <div class="common-item-top">
            <div class="common-logo">
                <img src="/images/hos_4.png"/>
            </div>
            <div class="common-body">
                <h4>北京协和医院</h4>
                <span>三级甲等</span>
            </div>
        </div>

        <div class="common-item-bottom">
            <a href="yuyue.html">核酸检测1</a>
            <a href="yuyue.html">核酸检测222</a>
            <a href="yuyue.html">核酸检测2</a>
            <a href="yuyue.html">核酸检测33333</a>
            <a href="yuyue.html">核酸检测4</a>
            <a href="yuyue.html">核酸检测33</a>
            <a href="yuyue.html">核酸检测22</a>
        </div>

    </div>

    <div class="common-item">
        <div class="common-item-top">
            <div class="common-logo">
                <img src="/images/hos_2.png"/>
            </div>
            <div class="common-body">
                <h4>北京协和医院</h4>
                <span>三级甲等</span>
            </div>
        </div>

        <div class="common-item-bottom">
            <a href="yuyue.html">核酸检测1</a>
            <a href="yuyue.html">核酸检测222</a>
            <a href="yuyue.html">核酸检测2</a>
            <a href="yuyue.html">核酸检测33333</a>
            <a href="yuyue.html">核酸检测4</a>
            <a href="yuyue.html">核酸检测33</a>
            <a href="yuyue.html">核酸检测22</a>
        </div>

    </div>

    <div class="common-item">
        <div class="common-item-top">
            <div class="common-logo">
                <img src="/images/hos_1.png"/>
            </div>
            <div class="common-body">
                <h4>北京协和医院</h4>
                <span>三级甲等</span>
            </div>
        </div>

        <div class="common-item-bottom">
            <a href="yuyue.html">核酸检测1</a>
            <a href="yuyue.html">核酸检测222</a>
            <a href="yuyue.html">核酸检测2</a>
            <a href="yuyue.html">核酸检测33333</a>
            <a href="yuyue.html">核酸检测4</a>
            <a href="yuyue.html">核酸检测33</a>
            <a href="yuyue.html">核酸检测22</a>
        </div>

    </div>

    <div class="common-item">
        <div class="common-item-top">
            <div class="common-logo">
                <img src="/images/hos_1.png"/>
            </div>
            <div class="common-body">
                <h4>北京协和医院</h4>
                <span>三级甲等</span>
            </div>
        </div>

        <div class="common-item-bottom">
            <a href="yuyue.html">核酸检测1</a>
            <a href="yuyue.html">核酸检测222</a>
            <a href="yuyue.html">核酸检测2</a>
            <a href="yuyue.html">核酸检测33333</a>
            <a href="yuyue.html">核酸检测4</a>
            <a href="yuyue.html">核酸检测33</a>
            <a href="yuyue.html">核酸检测22</a>
        </div>

    </div>

    <div class="common-item">
        <div class="common-item-top">
            <div class="common-logo">
                <img src="/images/hos_5.png"/>
            </div>
            <div class="common-body">
                <h4>北京协和医院</h4>
                <span>三级甲等</span>
            </div>
        </div>

        <div class="common-item-bottom">
            <a href="yuyue.html">核酸检测1</a>
            <a href="yuyue.html">核酸检测222</a>
            <a href="yuyue.html">核酸检测2</a>
            <a href="yuyue.html">核酸检测33333</a>
            <a href="yuyue.html">核酸检测4</a>
            <a href="yuyue.html">核酸检测33</a>
            <a href="yuyue.html">核酸检测22</a>
        </div>

    </div>

    <div class="common-item">
        <div class="common-item-top">
            <div class="common-logo">
                <img src="/images/hos_3.png"/>
            </div>
            <div class="common-body">
                <h4>北京协和医院</h4>
                <span>三级甲等</span>
            </div>
        </div>

        <div class="common-item-bottom">
            <a href="yuyue.html">核酸检测1</a>
            <a href="yuyue.html">核酸检测222</a>
            <a href="yuyue.html">核酸检测2</a>
            <a href="yuyue.html">核酸检测33333</a>
            <a href="yuyue.html">核酸检测4</a>
            <a href="yuyue.html">核酸检测33</a>
            <a href="yuyue.html">核酸检测22</a>
        </div>

    </div>

</div>


<div class="date-layer" style="display:none;">
    <div class="date-layer-title">
        <span class="aui-iconfont aui-icon-left"></span>
        <h4></h4>
        <span class="aui-iconfont aui-icon-right"></span>
        <i class="aui-iconfont aui-icon-close date-layer-close"></i>
    </div>
    <div class="date-layer-body">

        <div class="date-layer-week">
            <span>一</span>
            <span>二</span>
            <span>三</span>
            <span>四</span>
            <span>五</span>
            <span>六</span>
            <span>日</span>
        </div>

        <div class="date-year-list">

        </div>

    </div>
</div>
</body>
<script src="js/jquery.min.js"></script>
<script src="layer/layer.js"></script>
<script type="text/javascript">
    $('.origin-list').css('paddingTop', 120);

    $('.filter-item').click(function () {
        $('.filter-item').removeClass('filter-item-active');
        $(this).addClass('filter-item-active');
    })

    $('.filter-left').click(function () {
        var name = $(this).find('i').attr('class');
        if (name == 'arrow-down') {
            $(this).find('i').removeClass('arrow-down');
            $(this).find('i').addClass('arrow-up');
            $('.filter-area-list').css('display', 'flex');
        } else if (name == 'arrow-up') {
            $(this).find('i').addClass('arrow-down');
            $(this).find('i').removeClass('arrow-up');
            $('.filter-area-list').css('display', 'none');
        }
    })

    $('.filter-area-item').click(function () {
        $('.filter-area-item').removeClass('filter-area-active');
        $(this).addClass('filter-area-active');

        $('.filter-left').find('i').addClass('arrow-down');
        $('.filter-left').find('i').removeClass('arrow-up');
        $('.filter-area-list').css('display', 'none');
    })

    $('.yuyue-time-item').click(function () {
        $('.yuyue-time-item').removeClass('yuyue-time-item-active');
        $(this).addClass('yuyue-time-item-active');
        var status = $(this).attr('data-status');
        if (status == '1') {
            $('.yuyue-empty').css('display', 'block');
            $('.yuyue-have').css('display', 'none');
            $('.yuyue-full').css('display', 'none');
        } else if (status == '2') {
            $('.yuyue-empty').css('display', 'none');
            $('.yuyue-have').css('display', 'block');
            $('.yuyue-full').css('display', 'none');
        } else if (status == '3') {
            $('.yuyue-empty').css('display', 'none');
            $('.yuyue-have').css('display', 'none');
            $('.yuyue-full').css('display', 'block');
        }

    })

    //获取多少天
    function getMonthDay(year, month) {
        let days = new Date(year, month, 0).getDate()
        return days
    }

    //随机数函数
    function random(min, max) {
        return Math.floor(Math.random() * (max - min)) + min;
    }

    /*获取上个月*/
    function getPreMonth(date) {
        var arr = date.split('-');
        var year = arr[0]; //获取当前日期的年份
        var month = arr[1]; //获取当前日期的月份
        var day = arr[2]; //获取当前日期的日
        var days = new Date(year, month, 0);
        days = days.getDate(); //获取当前日期中月的天数
        var year2 = year;
        var month2 = parseInt(month) - 1;
        if (month2 == 0) {
            year2 = parseInt(year2) - 1;
            month2 = 12;
        }
        var day2 = day;
        var days2 = new Date(year2, month2, 0);
        days2 = days2.getDate();
        if (day2 > days2) {
            day2 = days2;
        }
        if (month2 < 10) {
            month2 = '0' + month2;
        }
        var t2 = year2 + '-' + month2 + '-' + day2;
        return t2;
    }

    /*获取下个月*/
    function getNextMonth(date) {
        var arr = date.split('-');
        var year = arr[0]; //获取当前日期的年份
        var month = arr[1]; //获取当前日期的月份
        var day = arr[2]; //获取当前日期的日
        var days = new Date(year, month, 0);
        days = days.getDate(); //获取当前日期中的月的天数
        var year2 = year;
        var month2 = parseInt(month) + 1;
        if (month2 == 13) {
            year2 = parseInt(year2) + 1;
            month2 = 1;
        }
        var day2 = day;
        var days2 = new Date(year2, month2, 0);
        days2 = days2.getDate();
        if (day2 > days2) {
            day2 = days2;
        }
        if (month2 < 10) {
            month2 = '0' + month2;
        }
        var t2 = year2 + '-' + month2;
        return t2;
    }

    //获取年份、月
    var date = new Date;
    var year = date.getFullYear();
    var month = date.getMonth() + 1;
    var days = getMonthDay(year, month);
    var arr = new Array();

    $('.date-layer-title h4').html(year + '年' + month + '月');

    for (var i = 1; i <= days; i++) {
        var date = new Date();
        var week = date.getDay();
        date.setDate(i);
        var dateStart = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate();
        var date_year = date.getFullYear();
        var date_month = date.getMonth() + 1;
        var date_day = date.getDate();
        var status = random(1, 4)
        date_month = String(date_month > 9 ? date_month : '0' + date_month);
        date_day = String(date_day > 9 ? date_day : '0' + date_day);

        var obj = {
            date: date_year + '-' + date_month + '-' + date_day,
            number: date_day,
            week: week,
            status: status
        }
        arr.push(obj);
    }

    var empty = arr[0].week == 0 ? 6 : arr[0].week - 1;

    //生成占位
    var html = '';
    for (var i = 0; i < empty; i++) {
        html += '<div class="date-year-item"></div>';
    }
    $('.date-year-list').html(html);

    //1无号 2有号 3约满

    var html = $('.date-year-list').html();
    for (var i = 0; i < arr.length; i++) {
        switch (arr[i]['status']) {
            case '1':
                html += '<div class="date-year-item"><div class="date-year-wrap date-year-item-no"><span>' + arr[i]['number'] + '</span><em>无号</em></div></div>';
                break;
            case '2':
                html += '<div class="date-year-item"><div class="date-year-wrap date-year-item-have"><span>' + arr[i]['number'] + '</span><em>有号</em></div></div>';
                break;
            case '3':
                html += '<div class="date-year-item"><div class="date-year-wrap date-year-item-full"><span>' + arr[i]['number'] + '</span><em>约满</em></div></div>';
                break;
            default:
        }

    }
    $('.date-year-list').html(html);

    $('.yuyue-time-choose').click(function () {
        layer.open({
            type: 1,
            anim: 2,
            title: false,
            closeBtn: false,
            offset: 'b',
            area: ['100%', 'auto'],
            shadeClose: true,
            content: $('.date-layer')
        });
    })

    $('.date-layer-close').click(function functionName() {
        layer.closeAll();
    })


    $('.common-tab a').click(function () {
        $('.common-tab a').removeClass('common-tab-active');
        $(this).addClass('common-tab-active');

        var type = $(this).attr('data-type');
        if (type == '1') {
            $('.yuyue-empty').css('display', 'block');
            $('.yuyue-have').css('display', 'none');
            $('.yuyue-full').css('display', 'none');
            $('.yuyue-date').css('display', 'block');
            $('.doctor-list').css('display', 'none');
        } else {
            $('.yuyue-empty').css('display', 'none');
            $('.yuyue-have').css('display', 'none');
            $('.yuyue-full').css('display', 'none');
            $('.yuyue-date').css('display', 'none');
            $('.doctor-list').css('display', 'block');
        }
    })
</script>

</html>
